package com.nondo.dean.pay.mapper;

import com.nondo.dean.pay.domain.MchNotify;
import com.nondo.dean.pay.domain.MchNotifyExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.type.JdbcType;

public interface MchNotifyMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_mch_notify
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @SelectProvider(type=MchNotifySqlProvider.class, method="countByExample")
    long countByExample(MchNotifyExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_mch_notify
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @DeleteProvider(type=MchNotifySqlProvider.class, method="deleteByExample")
    int deleteByExample(MchNotifyExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_mch_notify
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @Delete({
        "delete from pay_mch_notify",
        "where order_id = #{orderId,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String orderId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_mch_notify
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @Insert({
        "insert into pay_mch_notify (order_id, mch_id, ",
        "mch_order_no, order_type, ",
        "notify_url, notify_count, ",
        "result, status, ",
        "last_notify_time, create_time, ",
        "update_time)",
        "values (#{orderId,jdbcType=VARCHAR}, #{mchId,jdbcType=VARCHAR}, ",
        "#{mchOrderNo,jdbcType=VARCHAR}, #{orderType,jdbcType=VARCHAR}, ",
        "#{notifyUrl,jdbcType=VARCHAR}, #{notifyCount,jdbcType=TINYINT}, ",
        "#{result,jdbcType=VARCHAR}, #{status,jdbcType=TINYINT}, ",
        "#{lastNotifyTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP}, ",
        "#{updateTime,jdbcType=TIMESTAMP})"
    })
    int insert(MchNotify record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_mch_notify
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @InsertProvider(type=MchNotifySqlProvider.class, method="insertSelective")
    int insertSelective(MchNotify record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_mch_notify
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @SelectProvider(type=MchNotifySqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="order_id", property="orderId", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="mch_id", property="mchId", jdbcType=JdbcType.VARCHAR),
        @Result(column="mch_order_no", property="mchOrderNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="order_type", property="orderType", jdbcType=JdbcType.VARCHAR),
        @Result(column="notify_url", property="notifyUrl", jdbcType=JdbcType.VARCHAR),
        @Result(column="notify_count", property="notifyCount", jdbcType=JdbcType.TINYINT),
        @Result(column="result", property="result", jdbcType=JdbcType.VARCHAR),
        @Result(column="status", property="status", jdbcType=JdbcType.TINYINT),
        @Result(column="last_notify_time", property="lastNotifyTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    List<MchNotify> selectByExampleWithRowbounds(MchNotifyExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_mch_notify
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @SelectProvider(type=MchNotifySqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="order_id", property="orderId", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="mch_id", property="mchId", jdbcType=JdbcType.VARCHAR),
        @Result(column="mch_order_no", property="mchOrderNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="order_type", property="orderType", jdbcType=JdbcType.VARCHAR),
        @Result(column="notify_url", property="notifyUrl", jdbcType=JdbcType.VARCHAR),
        @Result(column="notify_count", property="notifyCount", jdbcType=JdbcType.TINYINT),
        @Result(column="result", property="result", jdbcType=JdbcType.VARCHAR),
        @Result(column="status", property="status", jdbcType=JdbcType.TINYINT),
        @Result(column="last_notify_time", property="lastNotifyTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    List<MchNotify> selectByExample(MchNotifyExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_mch_notify
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @Select({
        "select",
        "order_id, mch_id, mch_order_no, order_type, notify_url, notify_count, result, ",
        "status, last_notify_time, create_time, update_time",
        "from pay_mch_notify",
        "where order_id = #{orderId,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="order_id", property="orderId", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="mch_id", property="mchId", jdbcType=JdbcType.VARCHAR),
        @Result(column="mch_order_no", property="mchOrderNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="order_type", property="orderType", jdbcType=JdbcType.VARCHAR),
        @Result(column="notify_url", property="notifyUrl", jdbcType=JdbcType.VARCHAR),
        @Result(column="notify_count", property="notifyCount", jdbcType=JdbcType.TINYINT),
        @Result(column="result", property="result", jdbcType=JdbcType.VARCHAR),
        @Result(column="status", property="status", jdbcType=JdbcType.TINYINT),
        @Result(column="last_notify_time", property="lastNotifyTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    MchNotify selectByPrimaryKey(String orderId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_mch_notify
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @UpdateProvider(type=MchNotifySqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") MchNotify record, @Param("example") MchNotifyExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_mch_notify
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @UpdateProvider(type=MchNotifySqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") MchNotify record, @Param("example") MchNotifyExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_mch_notify
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @UpdateProvider(type=MchNotifySqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(MchNotify record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_mch_notify
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @Update({
        "update pay_mch_notify",
        "set mch_id = #{mchId,jdbcType=VARCHAR},",
          "mch_order_no = #{mchOrderNo,jdbcType=VARCHAR},",
          "order_type = #{orderType,jdbcType=VARCHAR},",
          "notify_url = #{notifyUrl,jdbcType=VARCHAR},",
          "notify_count = #{notifyCount,jdbcType=TINYINT},",
          "result = #{result,jdbcType=VARCHAR},",
          "status = #{status,jdbcType=TINYINT},",
          "last_notify_time = #{lastNotifyTime,jdbcType=TIMESTAMP},",
          "create_time = #{createTime,jdbcType=TIMESTAMP},",
          "update_time = #{updateTime,jdbcType=TIMESTAMP}",
        "where order_id = #{orderId,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(MchNotify record);
}